﻿namespace WPForms.Phone.DataAccess
{
    using System;
    using System.Data.Linq;
    using System.Data.Linq.Mapping;
    using System.Net;
    using System.Windows;
    using System.Windows.Controls;
    using System.Windows.Documents;
    using System.Windows.Ink;
    using System.Windows.Input;
    using System.Windows.Media;
    using System.Windows.Media.Animation;
    using System.Windows.Shapes;

    /// <summary>
    /// Partial class for the Form db model.
    /// </summary>
    public sealed partial class Form
    {
        /// <summary>
        /// Associated field values.
        /// </summary>
        private EntitySet<FieldValue> fieldValues;

        /// <summary>
        /// The associated attachments
        /// </summary>
        private EntitySet<Attachment> attachments;

        /// <summary>
        /// Initializes a new instance of the <see cref="Form" /> class.
        /// </summary>
        public Form()
        {
            this.fieldValues = new EntitySet<FieldValue>();
            this.attachments = new EntitySet<Attachment>();
        }

        /// <summary>
        /// Gets the associated field values.
        /// </summary>
        [Association(Name = "FK_Form_FieldValues", Storage = "fieldValues", ThisKey = "Id", OtherKey = "FormId")]
        public EntitySet<FieldValue> FieldValues
        {
            get
            {
                return this.fieldValues;
            }
        }

        /// <summary>
        /// Gets the associated attachments.
        /// </summary>
        [Association(Name = "FK_Form_Attachments", Storage = "attachments", ThisKey = "Id", OtherKey = "FormId")]
        public EntitySet<Attachment> Attachments
        {
            get
            {
                return this.attachments;
            }
        }
    }
}
